package controller;

import model.User;
import model.Role;
import dao.*;
import exception.DAOException;


public class UserManager {

	private UserDAO userDAO = null;
	
    public void updateUser(User user) throws DAOException {
        userDAO.updateUser(user);
    }

    public User findUser(String userId) throws DAOException {
        return userDAO.findUser(userId);
    }

    public User[] findAllUsers() throws DAOException {
        return userDAO.findAllUsers();
    }

    public Role findRole(String roleId) throws DAOException {
        Role result = userDAO.findRole(roleId);
        return result;
    }

    public Role[] findAllRoles() throws DAOException {
        Role[] result = userDAO.findAllRoles();
        return result;
    }
    
    public User[] findAllManagers()  throws  DAOException {  
        User[] result = userDAO.findAllManagers ();
        return result;
    }

	
}
